import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { TrackingMongoService } from './tracking-mongo.service';
import { TrackingController } from './tracking.controller';
import { TrackingLoggerService } from './tracking-logger.service';
import { Website, WebsiteSchema } from './schemas/website.schema';
import { PageView, PageViewSchema } from './schemas/page-view.schema';
import { TokenModule } from '../token/token.module';
import { WebsiteMongoService } from './website-mongo.service';
import { StatsMongoService } from './stats-mongo.service';
import { IpMongoService } from './ip-mongo.service';
import { SessionMongoService } from './session-mongo.service';
import { LogService } from './log.service';

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Website.name, schema: WebsiteSchema },
      { name: PageView.name, schema: PageViewSchema }
    ]),
    TokenModule
  ],
  controllers: [TrackingController],
  providers: [
    TrackingMongoService,
    TrackingLoggerService,
    WebsiteMongoService,
    StatsMongoService,
    IpMongoService,
    SessionMongoService,
    LogService
  ],
  exports: [
    TrackingMongoService,
    TrackingLoggerService,
    WebsiteMongoService,
    StatsMongoService,
    IpMongoService,
    SessionMongoService,
    LogService
  ]
})
export class TrackingModule {}